home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Komunik / Webscr / HTMLtool / _SETUP.1 / Page Enter Horizontal Bars.scp < prev    next >
Text File  |  1999-10-03  |  2KB  |  71 lines

  1. <HTMLtool>Page entering effect: Horizontal bars</HTMLtool>
  2. <style>
  3. <!--
  4. .intro{
  5. position:absolute;
  6. left:0;
  7. top:0;
  8. layer-background-color:blue;
  9. background-color:blue;
  10. border:0.1px solid blue
  11. }
  12. -->
  13. </style>
  14.  
  15. <div id="i1" class="intro"></div><div id="i2" class="intro"></div><div id="i3"
  16. class="intro"></div><div id="i4" class="intro"></div><div id="i5" class="intro"></div><div
  17. id="i6" class="intro"></div><div id="i7" class="intro"></div><div id="i8" class="intro"></div><script
  18. language="JavaScript1.2">
  19.  
  20.  
  21.  
  22. var speed=20
  23. var temp=new Array()
  24. var temp2=new Array()
  25. if (document.layers){
  26. for (i=1;i<=8;i++){
  27. temp[i]=eval("document.i"+i+".clip")
  28. temp2[i]=eval("document.i"+i)
  29. temp[i].width=window.innerWidth
  30. temp[i].height=window.innerHeight/8
  31. temp2[i].top=(i-1)*temp[i].height
  32. }
  33. }
  34. else if (document.all){
  35. var clipright=document.body.clientWidth,clipleft=0
  36. for (i=1;i<=8;i++){
  37. temp[i]=eval("document.all.i"+i+".style")
  38. temp[i].width=document.body.clientWidth
  39. temp[i].height=document.body.offsetHeight/8
  40. temp[i].top=(i-1)*parseInt(temp[i].height)
  41. }
  42. }
  43. function openit(){
  44. window.scrollTo(0,0)
  45. if (document.layers){
  46. for (i=1;i<=8;i=i+2)
  47. temp[i].right-=speed
  48. for (i=2;i<=8;i=i+2)
  49. temp[i].left+=speed
  50. if (temp[2].left>window.innerWidth)
  51. clearInterval(stopit)
  52. }
  53. else if (document.all){
  54. clipright-=speed
  55. for (i=1;i<=8;i=i+2){
  56. temp[i].clip="rect(0 "+clipright+" auto 0)"
  57. }
  58. clipleft+=speed
  59. for (i=2;i<=8;i=i+2){
  60. temp[i].clip="rect(0 auto auto "+clipleft+")"
  61. }
  62. if (clipright<=0)
  63. clearInterval(stopit)
  64. }
  65. }
  66. function gogo(){
  67. stopit=setInterval("openit()",100)
  68. }
  69. gogo()
  70. </script>
  71.